<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
  <meta name="description" content="API docs for the V2NIMChatroomClient class from the nim_core_v2 library, for the Dart programming language.">
  <title>V2NIMChatroomClient class - nim_core_v2 library - Dart API</title>


  
  <link rel="preconnect" href="https://fonts.gstatic.com">
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" rel="stylesheet">
  
  <link rel="stylesheet" href="../static-assets/github.css?v1">
  <link rel="stylesheet" href="../static-assets/styles.css?v1">
  <link rel="icon" href="../static-assets/favicon.png?v1">
  
</head>

<body data-base-href="../" data-using-base-href="false" class="light-theme">
<div id="overlay-under-drawer"></div>
<header id="title">
  <span id="sidenav-left-toggle" class="material-symbols-outlined" role="button" tabindex="0">menu</span>
  <ol class="breadcrumbs gt-separated dark hidden-xs">
    <li><a href="../index.html">nim_core_v2</a></li>
    <li><a href="../nim_core_v2/nim_core_v2-library.html">nim_core.dart</a></li>
    <li class="self-crumb">V2NIMChatroomClient class</li>
  </ol>
  <div class="self-name">V2NIMChatroomClient</div>
  <form class="search navbar-right" role="search">
    <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
  <div class="toggle" id="theme-button" title="Toggle brightness">
    <label for="theme">
      <input type="checkbox" id="theme" value="light-theme">
      <span id="dark-theme-button" class="material-symbols-outlined">
        dark_mode
      </span>
      <span id="light-theme-button" class="material-symbols-outlined">
        light_mode
      </span>
    </label>
  </div>
</header>
<main>
<div
    id="dartdoc-main-content"
    class="main-content"
    data-above-sidebar="nim_core_v2&#47;nim_core_v2-library-sidebar.html"
    data-below-sidebar="nim_core_v2&#47;V2NIMChatroomClient-class-sidebar.html">
    <div>
<h1><span class="kind-class">V2NIMChatroomClient</span> class 
 
</h1></div>

    



    
  <section class="summary offset-anchor" id="constructors">
    <h2>Constructors</h2>
    <dl class="constructor-summary-list">
        <dt id="V2NIMChatroomClient" class="callable">
          <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/V2NIMChatroomClient.html">V2NIMChatroomClient</a></span><span class="signature">({<span class="parameter" id="-param-instanceId"><span>required</span> <span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a></span> <span class="parameter-name">instanceId</span></span>})</span>
        </dt>
        <dd>
          
        </dd>
    </dl>
  </section>
    
  <section
      class="summary offset-anchor"
      id="instance-properties">
    <h2>Properties</h2>
    <dl class="properties">
        <dt id="extensionProvider" class="property">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/extensionProvider.html">extensionProvider</a></span>
  <span class="signature">&#8596; V2NIMChatroomLoginExtensionProvider?</span>
  

</dt>
<dd>
  登录扩展信息
  <div class="features"><span class="feature">getter/setter pair</span></div>

</dd>

        <dt id="hashCode" class="property inherited">
  <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/hashCode.html">hashCode</a></span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a></span>
  

</dt>
<dd class="inherited">
  The hash code for this object.
  <div class="features"><span class="feature">no setter</span><span class="feature">inherited</span></div>

</dd>

        <dt id="instanceId" class="property">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/instanceId.html">instanceId</a></span>
  <span class="signature">&#8596; <a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a></span>
  

</dt>
<dd>
  
  <div class="features"><span class="feature">getter/setter pair</span></div>

</dd>

        <dt id="linkProvider" class="property">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/linkProvider.html">linkProvider</a></span>
  <span class="signature">&#8596; V2NIMChatroomLinkProvider?</span>
  

</dt>
<dd>
  链接地址提供者
  <div class="features"><span class="feature">getter/setter pair</span></div>

</dd>

        <dt id="onChatroomEntered" class="property">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/onChatroomEntered.html">onChatroomEntered</a></span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Stream-class.html">Stream</a><span class="signature">&lt;<wbr><span class="type-parameter">void</span>&gt;</span></span>
  

</dt>
<dd>
  进入聊天室成功
  <div class="features"><span class="feature">no setter</span></div>

</dd>

        <dt id="onChatroomExited" class="property">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/onChatroomExited.html">onChatroomExited</a></span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Stream-class.html">Stream</a><span class="signature">&lt;<wbr><span class="type-parameter">NIMError?</span>&gt;</span></span>
  

</dt>
<dd>
  退出聊天室
  <div class="features"><span class="feature">no setter</span></div>

</dd>

        <dt id="onChatroomKicked" class="property">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/onChatroomKicked.html">onChatroomKicked</a></span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Stream-class.html">Stream</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../nim_core_v2/V2NIMChatroomKickedInfo-class.html">V2NIMChatroomKickedInfo</a></span>&gt;</span></span>
  

</dt>
<dd>
  自己被踢出聊天室
  <div class="features"><span class="feature">no setter</span></div>

</dd>

        <dt id="onChatroomStatus" class="property">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/onChatroomStatus.html">onChatroomStatus</a></span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Stream-class.html">Stream</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../nim_core_v2/V2NIMChatroomStatusInfo-class.html">V2NIMChatroomStatusInfo</a></span>&gt;</span></span>
  

</dt>
<dd>
  聊天室状态变更
  <div class="features"><span class="feature">no setter</span></div>

</dd>

        <dt id="runtimeType" class="property inherited">
  <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html">runtimeType</a></span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Type-class.html">Type</a></span>
  

</dt>
<dd class="inherited">
  A representation of the runtime type of the object.
  <div class="features"><span class="feature">no setter</span><span class="feature">inherited</span></div>

</dd>

        <dt id="tokenProvider" class="property">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/tokenProvider.html">tokenProvider</a></span>
  <span class="signature">&#8596; V2NIMChatroomTokenProvider?</span>
  

</dt>
<dd>
  token提供者
  <div class="features"><span class="feature">getter/setter pair</span></div>

</dd>

    </dl>
  </section>

    
  <section
      class="summary offset-anchor"
      id="instance-methods">
    <h2>Methods</h2>
    <dl class="callables">
        <dt id="addChatroomClientListener" class="callable">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/addChatroomClientListener.html">addChatroomClientListener</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../nim_core_v2/NIMResult-class.html">NIMResult</a><span class="signature">&lt;<wbr><span class="type-parameter">void</span>&gt;</span></span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  添加聊天室实例监听器
  

</dd>

        <dt id="enter" class="callable">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/enter.html">enter</a></span><span class="signature">(<wbr><span class="parameter" id="enter-param-roomId"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> <span class="parameter-name">roomId</span>, </span><span class="parameter" id="enter-param-enterParams"><span class="type-annotation"><a href="../nim_core_v2/V2NIMChatroomEnterParams-class.html">V2NIMChatroomEnterParams</a></span> <span class="parameter-name">enterParams</span></span>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../nim_core_v2/NIMResult-class.html">NIMResult</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../nim_core_v2/V2NIMChatroomEnterResult-class.html">V2NIMChatroomEnterResult</a></span>&gt;</span></span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  进入聊天室
  

</dd>

        <dt id="exit" class="callable">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/exit.html">exit</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../nim_core_v2/NIMResult-class.html">NIMResult</a><span class="signature">&lt;<wbr><span class="type-parameter">void</span>&gt;</span></span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  退出聊天室
  

</dd>

        <dt id="getChatroomInfo" class="callable">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/getChatroomInfo.html">getChatroomInfo</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../nim_core_v2/NIMResult-class.html">NIMResult</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../nim_core_v2/V2NIMChatroomInfo-class.html">V2NIMChatroomInfo</a></span>&gt;</span></span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  getChatroomInfo
  

</dd>

        <dt id="getChatroomQueueService" class="callable">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/getChatroomQueueService.html">getChatroomQueueService</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="../nim_core_v2/V2NIMChatroomQueueService-class.html">V2NIMChatroomQueueService</a></span>
  </span>
  

</dt>
<dd>
  获取聊天室队列服务， 后续相关操作均在服务中实现
  

</dd>

        <dt id="getChatroomService" class="callable">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/getChatroomService.html">getChatroomService</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="../nim_core_v2/V2NIMChatroomService-class.html">V2NIMChatroomService</a></span>
  </span>
  

</dt>
<dd>
  获取聊天室服务， 后续相关操作均在服务中实现
  

</dd>

        <dt id="getInstanceId" class="callable">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/getInstanceId.html">getInstanceId</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a>?</span>
  </span>
  

</dt>
<dd>
  获取V2NIMChatroomClient对象的identityId（唯一标识）
  

</dd>

        <dt id="getStorageService" class="callable">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/getStorageService.html">getStorageService</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="../nim_core_v2/StorageService-class.html">StorageService</a></span>
  </span>
  

</dt>
<dd>
  获取聊天室存储服务， 后续相关操作均在服务中实现
  

</dd>

        <dt id="noSuchMethod" class="callable inherited">
  <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html">noSuchMethod</a></span><span class="signature">(<wbr><span class="parameter" id="noSuchMethod-param-invocation"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/Invocation-class.html">Invocation</a></span> <span class="parameter-name">invocation</span></span>)
    <span class="returntype parameter">&#8594; dynamic</span>
  </span>
  

</dt>
<dd class="inherited">
  Invoked when a nonexistent method or property is accessed.
  <div class="features"><span class="feature">inherited</span></div>

</dd>

        <dt id="removeChatroomClientListener" class="callable">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/removeChatroomClientListener.html">removeChatroomClientListener</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../nim_core_v2/NIMResult-class.html">NIMResult</a><span class="signature">&lt;<wbr><span class="type-parameter">void</span>&gt;</span></span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  移除聊天室实例监听器
  

</dd>

        <dt id="toString" class="callable inherited">
  <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/toString.html">toString</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span>
  </span>
  

</dt>
<dd class="inherited">
  A string representation of this object.
  <div class="features"><span class="feature">inherited</span></div>

</dd>

    </dl>
  </section>
    
  <section
      class="summary offset-anchor inherited"
      id="operators">
    <h2>Operators</h2>
    <dl class="callables">
        <dt id="operator ==" class="callable inherited">
  <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html">operator ==</a></span><span class="signature">(<wbr><span class="parameter" id="==-param-other"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/Object-class.html">Object</a></span> <span class="parameter-name">other</span></span>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span>
  </span>
  

</dt>
<dd class="inherited">
  The equality operator.
  <div class="features"><span class="feature">inherited</span></div>

</dd>

    </dl>
  </section>
    
  <section class="summary offset-anchor" id="static-properties">
    <h2>Static Properties</h2>
    <dl class="properties">
        <dt id="chatroomClientMap" class="property">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/chatroomClientMap.html">chatroomClientMap</a></span>
  <span class="signature">&#8596; <a href="https://api.flutter.dev/flutter/dart-core/Map-class.html">Map</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a></span>, <span class="type-parameter"><a href="../nim_core_v2/V2NIMChatroomClient-class.html">V2NIMChatroomClient</a></span>&gt;</span></span>
  

</dt>
<dd>
  
  <div class="features"><span class="feature">getter/setter pair</span></div>

</dd>

    </dl>
  </section>
    
  <section class="summary offset-anchor" id="static-methods">
    <h2>Static Methods</h2>
    <dl class="callables">
        <dt id="destroyAll" class="callable">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/destroyAll.html">destroyAll</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../nim_core_v2/NIMResult-class.html">NIMResult</a><span class="signature">&lt;<wbr><span class="type-parameter">void</span>&gt;</span></span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  销毁当前的所有聊天室实例
  

</dd>

        <dt id="destroyInstance" class="callable">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/destroyInstance.html">destroyInstance</a></span><span class="signature">(<wbr><span class="parameter" id="destroyInstance-param-instanceId"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a></span> <span class="parameter-name">instanceId</span></span>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../nim_core_v2/NIMResult-class.html">NIMResult</a><span class="signature">&lt;<wbr><span class="type-parameter">void</span>&gt;</span></span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  销毁指定聊天室实例
  

</dd>

        <dt id="getInstance" class="callable">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/getInstance.html">getInstance</a></span><span class="signature">(<wbr><span class="parameter" id="getInstance-param-instanceId"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a></span> <span class="parameter-name">instanceId</span></span>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../nim_core_v2/NIMResult-class.html">NIMResult</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../nim_core_v2/V2NIMChatroomClient-class.html">V2NIMChatroomClient</a>?</span>&gt;</span></span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  通过identityId（唯一标识）获取之前已经创建的V2NIMChatroomClient
  

</dd>

        <dt id="getInstanceList" class="callable">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/getInstanceList.html">getInstanceList</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../nim_core_v2/NIMResult-class.html">NIMResult</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-core/List-class.html">List</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../nim_core_v2/V2NIMChatroomClient-class.html">V2NIMChatroomClient</a></span>&gt;</span>?</span>&gt;</span></span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  获取当前已经存在的聊天室实例列表
  

</dd>

        <dt id="init" class="callable">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/init.html">init</a></span><span class="signature">(<wbr><span class="parameter" id="init-param-options"><span class="type-annotation"><a href="../nim_core_v2/NIMSDKOptions-class.html">NIMSDKOptions</a></span> <span class="parameter-name">options</span></span>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../nim_core_v2/NIMResult-class.html">NIMResult</a><span class="signature">&lt;<wbr><span class="type-parameter">void</span>&gt;</span></span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  PC初始化
  

</dd>

        <dt id="newInstance" class="callable">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/newInstance.html">newInstance</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../nim_core_v2/NIMResult-class.html">NIMResult</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../nim_core_v2/V2NIMChatroomClient-class.html">V2NIMChatroomClient</a>?</span>&gt;</span></span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  构造一个新的聊天室实例
  

</dd>

        <dt id="uninit" class="callable">
  <span class="name"><a href="../nim_core_v2/V2NIMChatroomClient/uninit.html">uninit</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../nim_core_v2/NIMResult-class.html">NIMResult</a><span class="signature">&lt;<wbr><span class="type-parameter">void</span>&gt;</span></span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  PC初始化
  

</dd>

    </dl>
  </section>
    

  </div> <!-- /.main-content -->
  <div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left">
    <!-- The search input and breadcrumbs below are only responsively visible at low resolutions. -->
<header id="header-search-sidebar" class="hidden-l">
  <form class="search-sidebar" role="search">
    <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>
<ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
    <li><a href="../index.html">nim_core_v2</a></li>
    <li><a href="../nim_core_v2/nim_core_v2-library.html">nim_core_v2</a></li>
    <li class="self-crumb">V2NIMChatroomClient class</li>
</ol>

    <h5>nim_core_v2 library</h5>
    <div id="dartdoc-sidebar-left-content"></div>
  </div>
  <div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right">
  </div><!--/.sidebar-offcanvas-->
</main>
<footer>
  <span class="no-break">
    nim_core_v2
      10.9.2-ohos-beta
  </span>
  
</footer>


<script src="../static-assets/highlight.pack.js?v1"></script>
<script src="../static-assets/docs.dart.js"></script>

</body>
</html>

